<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8"/>
        <title>EasyUI&nbsp;Demo&nbsp;-&nbsp;ToolTip</title>
        <link rel="shortcut icon" href="../../assets/image/favicon.ico"/>
        <script type="text/javascript" src="../../assets/js/common.js"></script>
        <link rel="stylesheet" type="text/css" href="../../assets/libs/easyui/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="../../assets/libs/easyui/themes/icon.css">
        <script type="text/javascript" src="../../assets/libs/easyui/jquery.min.js"></script>
        <script type="text/javascript" src="../../assets/libs/easyui/jquery.easyui.min.js"></script>
    </head>
    <body>
        <h1>ToolTip&nbsp;-&nbsp;Base&nbsp;基础组件</h1>
        <fieldset>
            <legend>使用案例</legend>
            <h1>创建提示框</h1>
            <p>1. 通过标签创建提示框，给元素添加一个"easyui-tooltip"的类名，无需任何Javascript代码。</p>
            <a href="#" title="This is the tooltip message." class="easyui-tooltip">Hover me</a>
            <p>2. 通过Javascript创建提示框。</p>
            <a id="dd" href="javascript:void(0)">Click here</a>
        </fieldset>
    </body>
    <script type="text/javascript">
        $('#dd').tooltip({
            position: 'right',
            content: '<span style="color: #fff">This is the tooltip message.</span>',
            onShow: function(e) {
                console.log('onShow:', e);
                $(this).tooltip('tip').css({
                    backgroundColor: '#666',
                    borderColor: '#666'
                });
            },
            trackMouse: true,
            deltaX: 100,
            deltaY: -50,
            hideEvent: 'click',
            showDelay: 800,
            hideDelay: 1500
        });
    </script>
</html>